#include <stdio.h>
#include <math.h>

#define TRACE(x...) 
#define PRINT(x...) TRACE(printf(x))

#define rep(i,n) for (int i=1; i<=n; i++)

bool primes[3010];
int p;
int lim;

void sieve() {
	p=2; 

	rep(i,3005) primes[i]=true;
	primes[0]=primes[1]=false;

	while (p*p<=3000) {
		for (int i=2; i*p<=3000; i++)
			primes[i*p]=false;

		while (!primes[++p]) 
			if (p*p>3000) return;
	}
}

int n;
int pcont;
int ncont;

int main() {
	sieve();

	scanf("%d", &n);
	lim= sqrt(n)+1;

	rep(i,n) { 
		lim=sqrt(i)+1;
		pcont=0;
		
		for (int j=2; j<i; j++) {
			if (primes[j] && i%j==0) {
				PRINT("%d ", j);
				pcont++;
			}
		}

		PRINT("pcont de %d: %d\n", i, pcont);		

		if (pcont==2) ncont++; 
	}

	printf("%d\n", ncont);
	
	return 0;
}
